package com.hyzh.latte.hj.enterprise;

import com.coffee.core.CoffeeEnum;

/**
 * @author songkui
 * @since 2024/5/8 18:08
 */
public enum CommandCodeEnum implements CoffeeEnum<Integer> {
    RTD(2011, "实时数据"),
    MD(2051, "分数据"),
    HD(2061, "时数据"),
    DD(2031, "天数据"),
    ;

    private final Integer code;
    private final String label;

    CommandCodeEnum(Integer code, String label){
        this.code = code;
        this.label = label;
    }


    @Override
    public Integer code() {
        return this.code;
    }

    @Override
    public String label() {
        return this.label;
    }

    public static CommandCodeEnum ofCode(Integer code) {
        for (CommandCodeEnum genderEnum : values()) {
            if (genderEnum.code.equals(code)) {
                return genderEnum;
            }
        }
        return null;
    }


}
